package com.gdut.syncThread;

public class SyncThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        MyRunnable1 myRunnable = new MyRunnable1();
        Thread t1 = new Thread(myRunnable, "1num");
        Thread t2 = new Thread(myRunnable, "2num");
        Thread t3 = new Thread(myRunnable, "3num");
        t1.start();
        t2.start();
        t3.start();
        t1.join();
        t2.join();
        t3.join();
        for (int i = 0; i < 3; i++) {
            System.out.println(MyRunnable1.count[i]);
        }

    }
}
